﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualBasic;
using System.Collections;
using System.Data;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace MarqueeMoment.CameraController.Common
{
    public static class EDSDKErrors
    {


        public const long EDS_ERRORID_MASK = 0xffffL;
        public const int EDS_ERR_OK = 0;
        ///* Miscellaneous errors */
        public const long EDS_ERR_UNIMPLEMENTED = 0x1L;
        public const long EDS_ERR_INTERNAL_ERROR = 0x2L;
        public const long EDS_ERR_MEM_ALLOC_FAILED = 0x3L;
        public const long EDS_ERR_MEM_FREE_FAILED = 0x4L;
        public const long EDS_ERR_OPERATION_CANCELLED = 0x5L;
        public const long EDS_ERR_INCOMPATIBLE_VERSION = 0x6L;
        public const long EDS_ERR_NOT_SUPPORTED = 0x7L;
        public const long EDS_ERR_UNEXPECTED_EXCEPTION = 0x8L;
        public const long EDS_ERR_PROTECTION_VIOLATION = 0x9L;
        public const long EDS_ERR_MISSING_SUBCOMPONENT = 0xaL;

        public const long EDS_ERR_SELECTION_UNAVAILABLE = 0xbL;
        ///* File errors */
        public const long EDS_ERR_FILE_IO_ERROR = 0x20L;
        public const long EDS_ERR_FILE_TOO_MANY_OPEN = 0x21L;
        public const long EDS_ERR_FILE_NOT_FOUND = 0x22L;
        public const long EDS_ERR_FILE_OPEN_ERROR = 0x23L;
        public const long EDS_ERR_FILE_CLOSE_ERROR = 0x24L;
        public const long EDS_ERR_FILE_SEEK_ERROR = 0x25L;
        public const long EDS_ERR_FILE_TELL_ERROR = 0x26L;
        public const long EDS_ERR_FILE_READ_ERROR = 0x27L;
        public const long EDS_ERR_FILE_WRITE_ERROR = 0x28L;
        public const long EDS_ERR_FILE_PERMISSION_ERROR = 0x29L;
        public const long EDS_ERR_FILE_DISK_FULL_ERROR = 0x2aL;
        public const long EDS_ERR_FILE_ALREADY_EXISTS = 0x2bL;
        public const long EDS_ERR_FILE_FORMAT_UNRECOGNIZED = 0x2cL;
        public const long EDS_ERR_FILE_DATA_CORRUPT = 0x2dL;

        public const long EDS_ERR_FILE_NAMING_NA = 0x2eL;
        ///* Directory errors */          
        public const long EDS_ERR_DIR_NOT_FOUND = 0x40L;
        public const long EDS_ERR_DIR_IO_ERROR = 0x41L;
        public const long EDS_ERR_DIR_ENTRY_NOT_FOUND = 0x42L;
        public const long EDS_ERR_DIR_ENTRY_EXISTS = 0x43L;

        public const long EDS_ERR_DIR_NOT_EMPTY = 0x44L;
        ///* Property errors */
        public const long EDS_ERR_PROPERTIES_UNAVAILABLE = 0x50L;
        public const long EDS_ERR_PROPERTIES_MISMATCH = 0x51L;

        public const long EDS_ERR_PROPERTIES_NOT_LOADED = 0x53L;
        ///* Function Parameter errors */     
        public const long EDS_ERR_INVALID_PARAMETER = 0x60L;
        public const long EDS_ERR_INVALID_HANDLE = 0x61L;
        public const long EDS_ERR_INVALID_POINTER = 0x62L;
        public const long EDS_ERR_INVALID_INDEX = 0x63L;
        public const long EDS_ERR_INVALID_LENGTH = 0x64L;
        public const long EDS_ERR_INVALID_FN_POINTER = 0x65L;

        public const long EDS_ERR_INVALID_SORT_FN = 0x66L;
        ///* Device errors */
        public const long EDS_ERR_DEVICE_NOT_FOUND = 0x80L;
        public const long EDS_ERR_DEVICE_BUSY = 0x81L;
        public const long EDS_ERR_DEVICE_INVALID = 0x82L;
        public const long EDS_ERR_DEVICE_EMERGENCY = 0x83L;
        public const long EDS_ERR_DEVICE_MEMORY_FULL = 0x84L;
        public const long EDS_ERR_DEVICE_INTERNAL_ERROR = 0x85L;
        public const long EDS_ERR_DEVICE_INVALID_PARAMETER = 0x86L;
        public const long EDS_ERR_DEVICE_NO_DISK = 0x87L;
        public const long EDS_ERR_DEVICE_DISK_ERROR = 0x88L;
        public const long EDS_ERR_DEVICE_CF_GATE_CHANGED = 0x89L;
        public const long EDS_ERR_DEVICE_DIAL_CHANGED = 0x8aL;
        public const long EDS_ERR_DEVICE_NOT_INSTALLED = 0x8bL;
        public const long EDS_ERR_DEVICE_STAY_AWAKE = 0x8cL;

        public const long EDS_ERR_DEVICE_NOT_RELEASED = 0x8dL;
        ///* Stream errors */
        public const long EDS_ERR_STREAM_IO_ERROR = 0xa0L;
        public const long EDS_ERR_STREAM_NOT_OPEN = 0xa1L;
        public const long EDS_ERR_STREAM_ALREADY_OPEN = 0xa2L;
        public const long EDS_ERR_STREAM_OPEN_ERROR = 0xa3L;
        public const long EDS_ERR_STREAM_CLOSE_ERROR = 0xa4L;
        public const long EDS_ERR_STREAM_SEEK_ERROR = 0xa5L;
        public const long EDS_ERR_STREAM_TELL_ERROR = 0xa6L;
        public const long EDS_ERR_STREAM_READ_ERROR = 0xa7L;
        public const long EDS_ERR_STREAM_WRITE_ERROR = 0xa8L;
        public const long EDS_ERR_STREAM_PERMISSION_ERROR = 0xa9L;
        public const long EDS_ERR_STREAM_COULDNT_BEGIN_THREAD = 0xaaL;
        public const long EDS_ERR_STREAM_BAD_OPTIONS = 0xabL;

        public const long EDS_ERR_STREAM_END_OF_STREAM = 0xacL;
        ///* Communications errors */
        public const long EDS_ERR_COMM_PORT_IS_IN_USE = 0xc0L;
        public const long EDS_ERR_COMM_DISCONNECTED = 0xc1L;
        public const long EDS_ERR_COMM_DEVICE_INCOMPATIBLE = 0xc2L;
        public const long EDS_ERR_COMM_BUFFER_FULL = 0xc3L;

        public const long EDS_ERR_COMM_USB_BUS_ERR = 0xc4L;
        ///* Lock/Unlock */
        public const long EDS_ERR_USB_DEVICE_LOCK_ERROR = 0xd0L;

        public const long EDS_ERR_USB_DEVICE_UNLOCK_ERROR = 0xd1L;
        ///* STI/WIA */
        public const long EDS_ERR_STI_UNKNOWN_ERROR = 0xe0L;
        public const long EDS_ERR_STI_INTERNAL_ERROR = 0xe1L;
        public const long EDS_ERR_STI_DEVICE_CREATE_ERROR = 0xe2L;
        public const long EDS_ERR_STI_DEVICE_RELEASE_ERROR = 0xe3L;

        public const long EDS_ERR_DEVICE_NOT_LAUNCHED = 0xe4L;
        public const long EDS_ERR_ENUM_NA = 0xf0L;
        public const long EDS_ERR_INVALID_FN_CALL = 0xf1L;
        public const long EDS_ERR_HANDLE_NOT_FOUND = 0xf2L;
        public const long EDS_ERR_INVALID_ID = 0xf3L;

        public const long EDS_ERR_WAIT_TIMEOUT_ERROR = 0xf4L;
        ///* PTP */
        public const int EDS_ERR_SESSION_NOT_OPEN = 0x2003;
        public const int EDS_ERR_INVALID_TRANSACTIONID = 0x2004;
        public const int EDS_ERR_INCOMPLETE_TRANSFER = 0x2007;
        public const int EDS_ERR_INVALID_STRAGEID = 0x2008;
        public const int EDS_ERR_DEVICEPROP_NOT_SUPPORTED = 0x200a;
        public const int EDS_ERR_INVALID_OBJECTFORMATCODE = 0x200b;
        public const int EDS_ERR_SELF_TEST_FAILED = 0x2011;
        public const int EDS_ERR_PARTIAL_DELETION = 0x2012;
        public const int EDS_ERR_SPECIFICATION_BY_FORMAT_UNSUPPORTED = 0x2014;
        public const int EDS_ERR_NO_VALID_OBJECTINFO = 0x2015;
        public const int EDS_ERR_INVALID_CODE_FORMAT = 0x2016;
        public const int EDS_ERR_UNKNOWN_VENDER_CODE = 0x2017;
        public const int EDS_ERR_CAPTURE_ALREADY_TERMINATED = 0x2018;
        public const int EDS_ERR_INVALID_PARENTOBJECT = 0x201a;
        public const int EDS_ERR_INVALID_DEVICEPROP_FORMAT = 0x201b;
        public const int EDS_ERR_INVALID_DEVICEPROP_VALUE = 0x201c;
        public const int EDS_ERR_SESSION_ALREADY_OPEN = 0x201e;
        public const int EDS_ERR_TRANSACTION_CANCELLED = 0x201f;
        public const int EDS_ERR_SPECIFICATION_OF_DESTINATION_UNSUPPORTED = 0x2020;
        public const int EDS_ERR_UNKNOWN_COMMAND = 0xa001;
        public const int EDS_ERR_OPERATION_REFUSED = 0xa005;
        public const int EDS_ERR_LENS_COVER_CLOSE = 0xa006;
        public const int EDS_ERR_LOW_BATTERY = 0xa101;

        public const int EDS_ERR_OBJECT_NOTREADY = 0xa102;
        public const long EDS_ERR_LAST_GENERIC_ERROR_PLUS_ONE = 0xf5L;
    }
}
